<template>
  <div class="wp-search-container">
    <div class="search-left">
      <slot />
    </div>
    <div class="search-right">
      <el-button
type="primary" @click="searchFn" icon="el-icon-search"
        >查询</el-button
      >
    </div>
  </div>
</template>

<script>
export default {
  props: {
    search: {
      type: Object,
      default: () => {}
    }
  },
  data () {
    return {
      params: this.search
    }
  },
  methods: {
    searchFn () {
      this.$nextTick(() => {
        this.$emit('on-search', this.search)
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.wp-search-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  .search-left{
    width: 100%;
  }
  .search-right {
    padding: 5px 25px 0 0;
  }
}
</style>
